import _axios from "axios"

const actions = {
   

    // 异步获取用户信息
    getUserInfo(context) {
        
        _axios({
            method: "GET",
            url: `http://47.115.51.185/api/userinfo`,
            headers: {
                'Authori-zation': 'Bearer ' + context.state.token
            }
        }).then(data => {
            context.commit('saveUserInfo', data.data);
        })

    }
}

export default actions